﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SDT.Site.ViewModels.CompanyListModels>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
<%if (Model.Companies != null && Model.Companies.Count > 0)
     {
         var first = Model.Companies[0]; %> 
<div class="art_top pad">
    <div class="art_top_l">
        <a href="/company/more/<%=first.ID %>">
            <% string imgPath = (first.ImagePath != null && first.ImagePath != string.Empty) ? SDT.Lib.Common.Utils.GenThumbnail(first.ID, 300, 225, first.ImagePath, Model.ImagePath, Model.ImageUrl) : SDT.Lib.Common.Globals.DefaultLogo; %>
            <img src="<%=imgPath %>" title="<%=first.Name %>" alt="<%=first.Name %>" class="bor_img" width="300" height="225" style="overflow:hidden"/>
        </a>
    </div>
    <div class="art_top_r">
        <div class="art_top_r_txt_hd">
            <h3><a href="/company/more/<%=first.ID %>/<%=Html.ToUrlFriendly(first.Name) %>" class="link_org"> <%=Html.Encode(first.Name) %></a></h3>
        </div>
        <div class="content-detail-art-date">
        <%=first.AddDate.ToString("HH:mm")%>&nbsp; | <%=first.AddDate.ToString("dd/MM/yyyy")%>&nbsp;|&nbsp;<%=Html.Encode(first.ShortName) %>
        </div>
        <div class="art_top_r_txt_ct" style="height:160; overflow:hidden">
             <div class="itemright">
                <p><b>Địa chỉ: </b><%=Html.Encode(first.Address)%></p>
                <p><b>Điện thoại: </b><%=Html.Encode(first.Phone)%></p>
                <p><b>Email: </b><%=Html.Encode(first.Email)%></p>
            </div>
        </div>
    </div>
</div>
<div class="clear"></div>
<%if (Model.Companies.Count > 1)
    {%>
    <div class="duan_list">
    <ul>
	    <%for (int i = 1; i < Model.Companies.Count; i++)
       {
           string imgPath1 = (Model.Companies[i].ImagePath != null && Model.Companies[i].ImagePath != string.Empty) ? SDT.Lib.Common.Utils.GenThumbnail(Model.Companies[i].ID, 132, 96, Model.Companies[i].ImagePath, Model.ImagePath, Model.ImageUrl) : SDT.Lib.Common.Globals.DefaultLogo;
           %>
	    <li>
    	    <a href="/company/more/<%=Model.Companies[i].ID %>/<%=Html.ToUrlFriendly(Model.Companies[i].Name) %>">
            <img class="bor_img" src="<%=imgPath1 %>" title="<%=Model.Companies[i].Name %>" alt="<%=Model.Companies[i].Name %>" width="132" height="96" /></a>
            <div><a href="/company/more/<%=Model.Companies[i].ID %>/<%=Html.ToUrlFriendly(Model.Companies[i].Name) %>"><strong><%=Html.Encode(Model.Companies[i].Name)%></strong></a></div>
        </li>
        <%}%>
       
    </ul>
    </div>
    <%}%>
<%} %>
<div class="clear"></div>
